import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Test1 extends Test2 {
	private String str;

	@Override
	public void save() {
		System.out.println("xxxx");
	}

	public static void main(String[] args) throws ClassNotFoundException, IOException {
		//        Map<String, String> m = new HashMap<String, String>();
		//        System.out.println(m == null);
		//        System.out.println(m.size());
		//        Class c = Class.forName("Test1");
		//        Field[] f = c.getFields();
		//        System.out.println(f.length);
		//        String xx = "mainTableInfo.sid";
		//        String[] xxArr = xx.split("\\.");
		//        System.out.println("xxxx");
		//        for (int i = 0; i < xxArr.length; i++) {
		//            System.out.println(xxArr[i]);
		//        }
		//        Field[] field = c.getDeclaredFields();
		//        for (int i = 0; i < field.length; i++) {
		//            System.out.println(field[0].getName());
		//        }

		String fis = new String("D://temp//xxx.txt");

		FileReader fr = new FileReader(fis);
		BufferedReader bf = new BufferedReader(fr);
		String line = null;

		StringBuffer sb = new StringBuffer();
		while ((line = bf.readLine()) != null) {
			sb.append(line);

		}
		System.out.println(sb.toString());

		System.out.println("..............................");
		System.out.println(getStringNoBlank(sb.toString()));

		String s = "sss";
		System.out.println(s.split("~").length);
	}

	public static String getStringNoBlank(String str) {
		if (str != null && !"".equals(str)) {
			Pattern p = Pattern.compile("\\s*|\t|\r|\n");
			Matcher m = p.matcher(str);
			String strNoBlank = m.replaceAll("");
			return strNoBlank;
		} else {
			return str;
		}
	}
}
